package com.example.demo.config;

import com.example.demo.directive.SelectDirective;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
public class FreemarkerConfig {

    @Autowired
    private freemarker.template.Configuration configuration;

    @Autowired
    private SelectDirective selectDirective;

    @PostConstruct
    private void config(){
        configuration.setSharedVariable("selectDirective", selectDirective);
    }
}
